.class public final Lcn/cheln/support/images/a;
.super Ljava/lang/Object;


# instance fields
.field private a:Lcn/cheln/support/images/FileIconLoader;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 1

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    new-instance v0, Lcn/cheln/support/images/FileIconLoader;

    invoke-direct {v0, p1}, Lcn/cheln/support/images/FileIconLoader;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcn/cheln/support/images/a;->a:Lcn/cheln/support/images/FileIconLoader;

    return-void
.end method


# virtual methods
.method public final a(Lcn/cheln/support/images/ThumbnailBase;Landroid/widget/ImageView;)V
    .locals 5

    iget-object v0, p1, Lcn/cheln/support/images/ThumbnailBase;->filePath:Ljava/lang/String;

    iget-wide v1, p1, Lcn/cheln/support/images/ThumbnailBase;->dbId:J

    invoke-virtual {p1}, Lcn/cheln/support/images/ThumbnailBase;->b()Z

    move-result v1

    if-eqz v1, :cond_1

    new-instance v1, Lcn/cheln/support/images/f;

    sget-object v2, Lcn/cheln/support/images/FileCategoryHelper$FileCategory;->Folder:Lcn/cheln/support/images/FileCategoryHelper$FileCategory;

    sget-object v3, Lcn/cheln/explorer/beans/FileInfo;->iconDir:Landroid/graphics/Bitmap;

    const/4 v4, 0x0

    invoke-direct {v1, v2, v3, v4}, Lcn/cheln/support/images/f;-><init>(Lcn/cheln/support/images/FileCategoryHelper$FileCategory;Landroid/graphics/Bitmap;[Ljava/lang/String;)V

    :goto_0
    iget-object v2, v1, Lcn/cheln/support/images/f;->b:Lcn/cheln/support/images/FileCategoryHelper$FileCategory;

    const/4 v3, 0x0

    iget-object v4, p0, Lcn/cheln/support/images/a;->a:Lcn/cheln/support/images/FileIconLoader;

    invoke-virtual {v4, p2}, Lcn/cheln/support/images/FileIconLoader;->a(Landroid/widget/ImageView;)V

    sget-object v4, Lcn/cheln/support/images/b;->a:[I

    invoke-virtual {v2}, Lcn/cheln/support/images/FileCategoryHelper$FileCategory;->ordinal()I

    move-result v2

    aget v2, v4, v2

    packed-switch v2, :pswitch_data_0

    move v0, v3

    :goto_1
    if-nez v0, :cond_0

    iget-object v0, v1, Lcn/cheln/support/images/f;->c:Landroid/graphics/Bitmap;

    invoke-virtual {p2, v0}, Landroid/widget/ImageView;->setImageBitmap(Landroid/graphics/Bitmap;)V

    :cond_0
    return-void

    :cond_1
    invoke-static {v0}, Lcn/cheln/support/images/FileCategoryHelper;->a(Ljava/lang/String;)Lcn/cheln/support/images/f;

    move-result-object v1

    goto :goto_0

    :pswitch_0
    iget-object v2, p1, Lcn/cheln/support/images/ThumbnailBase;->thumbnailPath:Ljava/lang/String;

    if-eqz v2, :cond_2

    new-instance v2, Ljava/io/File;

    iget-object v3, p1, Lcn/cheln/support/images/ThumbnailBase;->thumbnailPath:Ljava/lang/String;

    invoke-direct {v2, v3}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {v2}, Ljava/io/File;->exists()Z

    move-result v2

    if-eqz v2, :cond_2

    iget-object v0, p1, Lcn/cheln/support/images/ThumbnailBase;->thumbnailPath:Ljava/lang/String;

    :cond_2
    :pswitch_1
    iget-object v2, p0, Lcn/cheln/support/images/a;->a:Lcn/cheln/support/images/FileIconLoader;

    invoke-virtual {v2, p2, v0, v1}, Lcn/cheln/support/images/FileIconLoader;->a(Landroid/widget/ImageView;Ljava/lang/String;Lcn/cheln/support/images/f;)Z

    move-result v0

    goto :goto_1

    nop

    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_0
        :pswitch_1
        :pswitch_1
        :pswitch_1
    .end packed-switch
.end method
